package org.hawk.gwtppc.webtest.tests.classsuite;

import java.io.Serializable;
import java.util.RandomAccess;

import org.hawk.gwtppc.webtest.common.Asserts;
import org.hawk.gwtppc.webtest.common.Test;
import org.hawk.gwtppc.webtest.tests.mock.ClassMock;
import org.hawk.gwtppc.webtest.tests.mock.InterfaceMock;
import org.hawk.gwtppc.webtest.tests.mock.SubClassMock1;
import org.hawk.gwtppc.webtest.tests.mock.SubClassMock2;

public class GetInterfacesTest implements Test {

	public void run() throws Throwable {
		Asserts.assertEquals(ClassMock.class.getInterfaces().length, 1);
		Asserts.assertEquals(ClassMock.class.getInterfaces()[0], Appendable.class);
		Asserts.assertEquals(SubClassMock2.class.getInterfaces().length, 0);
		Asserts.assertEquals(SubClassMock1.class.getInterfaces().length, 3);
		Asserts.assertEquals(SubClassMock1.class.getInterfaces()[0], InterfaceMock.class);
		Asserts.assertEquals(SubClassMock1.class.getInterfaces()[1], Serializable.class);
		Asserts.assertEquals(SubClassMock1.class.getInterfaces()[2], RandomAccess.class);
	}

	public String getName() {
		return "getInterfaces()";
	}

}
